var template_= `<div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="[15, 30, 45]"
      :page-size="size"
      layout="total,sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
</div>`
// 需要这种方式导入(table.js) pagination : () => import('../components/pagination.js')
export default {
   // name:'pagination',
    props: {
        page: {
            type: Number,
            required: true
        },
        size: {
            type: Number,
            required: true
        },
        total:{
            type: Number,
            required: true
        }
    },
    methods: {
        handleSizeChange(size) {
            this.$emit('page-change', 1, size);
        },
        handleCurrentChange(page) {
            this.$emit('page-change', page, this.size);
        }
    },
    template:template_,
};

